import i18n from "@/i18n";

export const usernameValid = [
    {
        required: true,
        message: i18n.t('login.username_not_empty'),
        trigger: ['blur', 'change']
    },{
        min: 1,
        max: 20,
        message: i18n.t('login.username_over_length'),
        trigger: ['blur', 'change']
    }
];

export const passwordValid = [
    {
        required: true,
        message: i18n.t('login.password_not_empty'),
        trigger: ['blur', 'change']
    },{
        min: 1,
        max: 20,
        message: i18n.t('login.password_over_length'),
        trigger: ['blur', 'change']
    }
]

export const authCodeValid = [
    {
        required: true,
        message: i18n.t('login.captcha_not_empty'),
        trigger: ['blur', 'change']
    },{
        len: 4,
        message: i18n.t('login.captcha_over_length'),
        trigger: 'blur'
    }
]